package cn.gailvlun.gll.net.wish;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.Date;


public class WishCropped implements Parcelable {


    private int wishId;
    private int validity;
    private String wishText;
    @WishStatusRestricted
    private int wishStatus;

    private String ownerAvater;
    private boolean isBoy;
    private String city;
    private String age;
    private String ownerName;
    private String ownerBirthday;
    private String ownerCommentText;
    private Date ownerCommentDatetime;
    private int ownerCommentScore;


    private String accepterAvatar;
    private String accepterName;
    private String accepterBirthday;
    private String accepterCommentText;
    private Date accepterCommentDatetime;
    private int accepterCommentScore;


    public WishCropped() {
    }

    public int getWishId() {
        return wishId;
    }

    public WishCropped setWishId(int wishId) {
        this.wishId = wishId;
        return this;
    }

    public int getValidity() {
        return validity;
    }

    public WishCropped setValidity(int validity) {
        this.validity = validity;
        return this;
    }

    public String getWishText() {
        return wishText;
    }

    public WishCropped setWishText(String wishText) {
        this.wishText = wishText;
        return this;
    }

    public String getOwnerAvater() {
        return ownerAvater;
    }

    public WishCropped setOwnerAvater(String ownerAvater) {
        this.ownerAvater = ownerAvater;
        return this;
    }

    public String getOwnerName() {
        return ownerName;
    }

    public WishCropped setOwnerName(String ownerName) {
        this.ownerName = ownerName;
        return this;
    }

    public String getOwnerBirthday() {
        return ownerBirthday;
    }

    public WishCropped setOwnerBirthday(String ownerBirthday) {
        this.ownerBirthday = ownerBirthday;
        return this;
    }

    public String getOwnerCommentText() {
        return ownerCommentText;
    }

    public WishCropped setOwnerCommentText(String ownerCommentText) {
        this.ownerCommentText = ownerCommentText;
        return this;
    }

    public int getOwnerCommentScore() {
        return ownerCommentScore;
    }

    public WishCropped setOwnerCommentScore(int ownerCommentScore) {
        this.ownerCommentScore = ownerCommentScore;
        return this;
    }

    public String getAccepterAvatar() {
        return accepterAvatar;
    }

    public WishCropped setAccepterAvatar(String accepterAvatar) {
        this.accepterAvatar = accepterAvatar;
        return this;
    }

    public String getAccepterName() {
        return accepterName;
    }

    public WishCropped setAccepterName(String accepterName) {
        this.accepterName = accepterName;
        return this;
    }

    public String getAccepterBirthday() {
        return accepterBirthday;
    }

    public WishCropped setAccepterBirthday(String accepterBirthday) {
        this.accepterBirthday = accepterBirthday;
        return this;
    }

    public int getAccepterCommentScore() {
        return accepterCommentScore;
    }

    public WishCropped setAccepterCommentScore(int accepterCommentScore) {
        this.accepterCommentScore = accepterCommentScore;
        return this;
    }

    public String getAccepterCommentText() {
        return accepterCommentText;
    }

    public WishCropped setAccepterCommentText(String accepterCommentText) {
        this.accepterCommentText = accepterCommentText;
        return this;
    }

    public Date getOwnerCommentDatetime() {
        return ownerCommentDatetime;
    }

    public int getWishStatus() {
        return wishStatus;
    }

    public WishCropped setWishStatus(int wishStatus) {
        this.wishStatus = wishStatus;
        return this;
    }

    public boolean isBoy() {
        return isBoy;
    }

    public WishCropped setBoy(boolean boy) {
        isBoy = boy;
        return this;
    }

    public String getCity() {
        return city;
    }

    public WishCropped setCity(String city) {
        this.city = city;
        return this;
    }

    public String getAge() {
        return age;
    }

    public WishCropped setAge(String age) {
        this.age = age;
        return this;
    }

    public WishCropped setOwnerCommentDatetime(Date ownerCommentDatetime) {
        this.ownerCommentDatetime = ownerCommentDatetime;
        return this;
    }

    public Date getAccepterCommentDatetime() {
        return accepterCommentDatetime;
    }

    public WishCropped setAccepterCommentDatetime(Date accepterCommentDatetime) {
        this.accepterCommentDatetime = accepterCommentDatetime;
        return this;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.wishId);
        dest.writeInt(this.validity);
        dest.writeString(this.wishText);
        dest.writeInt(this.wishStatus);
        dest.writeString(this.ownerAvater);
        dest.writeByte(this.isBoy ? (byte) 1 : (byte) 0);
        dest.writeString(this.city);
        dest.writeString(this.age);
        dest.writeString(this.ownerName);
        dest.writeString(this.ownerBirthday);
        dest.writeString(this.ownerCommentText);
        dest.writeLong(this.ownerCommentDatetime != null ? this.ownerCommentDatetime.getTime() : -1);
        dest.writeInt(this.ownerCommentScore);
        dest.writeString(this.accepterAvatar);
        dest.writeString(this.accepterName);
        dest.writeString(this.accepterBirthday);
        dest.writeString(this.accepterCommentText);
        dest.writeLong(this.accepterCommentDatetime != null ? this.accepterCommentDatetime.getTime() : -1);
        dest.writeInt(this.accepterCommentScore);
    }

    protected WishCropped(Parcel in) {
        this.wishId = in.readInt();
        this.validity = in.readInt();
        this.wishText = in.readString();
        this.wishStatus = in.readInt();
        this.ownerAvater = in.readString();
        this.isBoy = in.readByte() != 0;
        this.city = in.readString();
        this.age = in.readString();
        this.ownerName = in.readString();
        this.ownerBirthday = in.readString();
        this.ownerCommentText = in.readString();
        long tmpOwnerCommentDatetime = in.readLong();
        this.ownerCommentDatetime = tmpOwnerCommentDatetime == -1 ? null : new Date(tmpOwnerCommentDatetime);
        this.ownerCommentScore = in.readInt();
        this.accepterAvatar = in.readString();
        this.accepterName = in.readString();
        this.accepterBirthday = in.readString();
        this.accepterCommentText = in.readString();
        long tmpAccepterCommentDatetime = in.readLong();
        this.accepterCommentDatetime = tmpAccepterCommentDatetime == -1 ? null : new Date(tmpAccepterCommentDatetime);
        this.accepterCommentScore = in.readInt();
    }

    public static final Creator<WishCropped> CREATOR = new Creator<WishCropped>() {
        @Override
        public WishCropped createFromParcel(Parcel source) {
            return new WishCropped(source);
        }

        @Override
        public WishCropped[] newArray(int size) {
            return new WishCropped[size];
        }
    };
}
